home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 6.9 KB | 164 lines | [TEXT/MPS ] |
- ;
- ; File: ADSP.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__ADSP__') = 'UNDEFINED' THEN
- __ADSP__ SET 1
-
-
- IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
- include 'Errors.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
- include 'AppleTalk.a'
- ENDIF
- ; include 'Types.a' ;
- ; include 'OSUtils.a' ;
- ; include 'MixedMode.a' ;
- ; include 'Memory.a' ;
-
- dspInit EQU 255 ; create a new connection end
- dspRemove EQU 254 ; remove a connection end
- dspOpen EQU 253 ; open a connection
- dspClose EQU 252 ; close a connection
- dspCLInit EQU 251 ; create a connection listener
- dspCLRemove EQU 250 ; remove a connection listener
- dspCLListen EQU 249 ; post a listener request
- dspCLDeny EQU 248 ; deny an open connection request
- dspStatus EQU 247 ; get status of connection end
- dspRead EQU 246 ; read data from the connection
- dspWrite EQU 245 ; write data on the connection
- dspAttention EQU 244 ; send an attention message
-
- dspOptions EQU 243 ; set connection end options
- dspReset EQU 242 ; forward reset the connection
- dspNewCID EQU 241 ; generate a cid for a connection end
- ; connection opening modes
- ocRequest EQU 1 ; request a connection with remote
- ocPassive EQU 2 ; wait for a connection request from remote
- ocAccept EQU 3 ; accept request as delivered by listener
- ocEstablish EQU 4 ; consider connection to be open
- ; connection end states
- sListening EQU 1 ; for connection listeners
- sPassive EQU 2 ; waiting for a connection request from remote
- sOpening EQU 3 ; requesting a connection with remote
- sOpen EQU 4 ; connection is open
- sClosing EQU 5 ; connection is being torn down
- sClosed EQU 6 ; connection end state is closed
- ; client event flags
- eClosed EQU $80 ; received connection closed advice
- eTearDown EQU $40 ; connection closed due to broken connection
- eAttention EQU $20 ; received attention message
- eFwdReset EQU $10 ; received forward reset advice
- ; miscellaneous constants
- attnBufSize EQU 570 ; size of client attention buffer
- minDSPQueueSize EQU 100 ; Minimum size of receive or send Queue
-
- ; connection control block
- TRCCB RECORD 0
- ccbLink ds.l 1 ; link to next ccb
- refNum ds.w 1 ; user reference number
- state ds.w 1 ; state of the connection end
- userFlags ds.b 1 ; flags for unsolicited connection events
- localSocket ds.b 1 ; socket number of this connection end
- remoteAddress ds AddrBlock ; internet address of remote end
- attnCode ds.w 1 ; attention code received
- attnSize ds.w 1 ; size of received attention data
- attnPtr ds.l 1 ; ptr to received attention data
- reserved ds.b 220 ; for adsp internal use
- sizeof EQU 242
- ENDR
-
- DSPParamBlock RECORD 0
- qLink ds.l 1
- qType ds.w 1
- ioTrap ds.w 1
- ioCmdAddr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- ioNamePtr ds.l 1
- ioVRefNum ds.w 1
- ioCRefNum ds.w 1 ; adsp driver refNum
- csCode ds.w 1 ; adsp driver control code
- qStatus ds.l 1 ; adsp internal use
- ccbRefNum ds.w 1
- VariantLevel0Begin EQU *
- ccbPtr ds.l 1 ; pointer to connection control block
- userRoutine ds.l 1 ; client routine to call on event
- sendQSize ds.w 1 ; size of send queue (0..64K bytes)
- sendQueue ds.l 1 ; client passed send queue buffer
- recvQSize ds.w 1 ; size of receive queue (0..64K bytes)
- recvQueue ds.l 1 ; client passed receive queue buffer
- attnPtr ds.l 1 ; client passed receive attention buffer
- localSocket ds.b 1 ; local socket number
- filler1 ds.b 1 ; filler for proper byte alignment
- ;dspInit, dspCLInit
- ORG VariantLevel0Begin
- localCID ds.w 1 ; local connection id
- remoteCID ds.w 1 ; remote connection id
- remoteAddress ds AddrBlock ; address of remote end
- filterAddress ds AddrBlock ; address filter
- sendSeq ds.l 1 ; local send sequence number
- sendWindow ds.w 1 ; send window size
- recvSeq ds.l 1 ; receive sequence number
- attnSendSeq ds.l 1 ; attention send sequence number
- attnRecvSeq ds.l 1 ; attention receive sequence number
- ocMode ds.b 1 ; open connection mode
- ocInterval ds.b 1 ; open connection request retry interval
- ocMaximum ds.b 1 ; open connection request retry maximum
- filler2 ds.b 1 ; filler for proper byte alignment
- ;dspOpen, dspCLListen, dspCLDeny
- ORG VariantLevel0Begin
- abort ds.b 1 ; abort connection immediately if non-zero
- filler3 ds.b 1 ; filler for proper byte alignment
- ;dspClose, dspRemove
- ORG VariantLevel0Begin
- reqCount ds.w 1 ; requested number of bytes
- actCount ds.w 1 ; actual number of bytes
- dataPtr ds.l 1 ; pointer to data buffer
- eom ds.b 1 ; indicates logical end of message
- flush ds.b 1 ; send data now
- ;dspRead, dspWrite
- ORG VariantLevel0Begin
- attnCode ds.w 1 ; client attention code
- attnSize ds.w 1 ; size of attention data
- attnData ds.l 1 ; pointer to attention data
- attnInterval ds.b 1 ; retransmit timer in 10-tick intervals
- filler4 ds.b 1 ; filler for proper byte alignment
- ;dspAttention
- ORG VariantLevel0Begin
- statusCCB ds.l 1 ; pointer to ccb
- sendQPending ds.w 1 ; pending bytes in send queue
- sendQFree ds.w 1 ; available buffer space in send queue
- recvQPending ds.w 1 ; pending bytes in receive queue
- recvQFree ds.w 1 ; available buffer space in receive queue
- ;dspStatus
- ORG VariantLevel0Begin
- sendBlocking ds.w 1 ; quantum for data packets
- sendTimer ds.b 1 ; send timer in 10-tick intervals
- rtmtTimer ds.b 1 ; retransmit timer in 10-tick intervals
- badSeqMax ds.b 1 ; threshold for sending retransmit advice
- useCheckSum ds.b 1 ; use ddp packet checksum
- ;dspOptions
- ORG VariantLevel0Begin
- newcid ds.w 1 ; new connection id returned
- ;dspNewCID
- sizeof EQU 68
- ENDR
-
- ENDIF ; __ADSP__
-